#include "includes.h"

#define DECLARE_CONST_UNICODE_STRING(_var, _string) \
const WCHAR _var ## _buffer[] = _string; \
const UNICODE_STRING _var = { sizeof(_string) - sizeof(WCHAR), sizeof(_string), (PWCH) _var ## _buffer }

#define DECLARE_UNICODE_STRING(_var, _string) \
WCHAR _var ## _buffer[] = _string; \
UNICODE_STRING _var = { sizeof(_string) - sizeof(WCHAR), sizeof(_string), (PWCH) _var ## _buffer }

#define DECLARE_CONST_ANSI_STRING(_var, _string) \
const CHAR _var ## _buffer[] = _string; \
const ANSI_STRING _var = { (USHORT)(sizeof(_string) - sizeof(CHAR)), (USHORT)sizeof(_string), (PCH) _var ## _buffer }

#define DECLARE_ANSI_STRING(_var, _string) \
CHAR _var ## _buffer[] = _string; \
ANSI_STRING _var = { (USHORT)(sizeof(_string) - sizeof(CHAR)), (USHORT)sizeof(_string), (PCH) _var ## _buffer }

/**
 * Prototypes for str.lib
 */
extern bool UNICODEtoANSI(PWCHAR szSrcString, DWORD dwLength);
extern bool ANSItoUNICODE(PCHAR szSrcString);
extern void getStrByTag(PCHAR str, PCHAR tag, DWORD num, PCHAR res);
extern BOOL strcmpmask(PCHAR str_, PCHAR mask_);
#ifdef BSTR
extern BOOL strcmpmaskW(BSTR str, BSTR mask);
#endif
//extern VOID correctLink(PCHAR link);
extern VOID CleanRep(PCHAR rep);
extern char * strnstr(const char *s, const char *find, size_t slen);
extern PCHAR * ExplodeStr(PCHAR szStr, DWORD dwLen, PCHAR szDiv, DWORD dwLimit, PDWORD pdwCount);
extern void FreeStrsList(IN OUT PCHAR * szStrs, IN DWORD dwCount);
//extern char * __cdecl _strtok_s(char *s1, const char *delimit, char **lastToken);